package gr.atc.epart.actions;


import java.util.Date;
import java.util.List;

import gr.atc.epart.users.User;


public class Petition extends Action {

	private Date _startDate;
	private Date _stopDate;
	private boolean _isLoginRequired = true;
	private int _numberOfSignatures;
	private List<PetitionSignature>	_signatures;

	public Petition()
	{
		_popularity = _visits = 0;
		_type = Action.Type.ePetition;

		_dateCreated = (new Date());
		_dateModified = null;

		_numberOfSignatures = 0;
	}
	
	public Petition(String name, String description, User creator,
			Date startDate, Date stopDate) 
	{
		_name = name;
		_description = description;
		_creator = creator;
		_startDate = startDate;
		_stopDate = stopDate;

		_popularity = _visits = 0;
		_type = Action.Type.ePetition;

		_dateCreated = (new Date());
		_dateModified = null;

		_numberOfSignatures = 0;
	}

	
	public Date getStartDate() 
	{
		return _startDate;
	}

	public void setStartDate(Date startDate) 
	{
		_startDate = startDate;
	}
	
	public Date getStopDate() 
	{
		return _stopDate;
	}

	public void setStopDate(Date stopDate) 
	{
		_stopDate = stopDate;
	}
	
	public int getSignaturesCount() 
	{
		return _numberOfSignatures;
	}

	public void setSignaturesCount(int signaturesCount) 
	{
		_numberOfSignatures = signaturesCount;
	}
	
	public List<PetitionSignature> getSignatures() 
	{
		return _signatures;
	}

	public void setSignatures(List<PetitionSignature> signatures) 
	{
		_signatures = signatures;
	}

	public void setLogInRequired(boolean logInRequired) 
	{
		_isLoginRequired = logInRequired;
	}

	public boolean isLogInRequired() {
		return _isLoginRequired;
	}
	
	
		
}
